<?php

// +---------------------------------------------+
// |     Copyright  2010 - 2018 InterPhoto       |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+


// ######################################################

error_reporting(E_ALL & ~E_NOTICE);

@include('../config/InterPhoto.config.php');

if(!defined('INTERPHOTO'))
{
	header('Location: ../install/index.php');
	exit();
}

define('ADMINPATH', dirname(dirname(__FILE__)).'/');

include(BASEPATH . 'includes/Class.Database.php');
include(BASEPATH . 'includes/InterPhoto.BaseUrl.php');

$DB = new DB;

$DB->database = $dbname;
$DB->server   = $servername;
$DB->user     = $dbusername;
$DB->password = $dbpassword;

$DB->connect();

$dbpassword   = '';
$DB->password = '';

$mainsettings = array();

$getmainsettings = $DB->query("SELECT varname, value FROM " . TABLE_PREFIX . "mainsettings");
while($setting = $DB->getrow($getmainsettings)) {
	$mainsettings[$setting['varname']] = $setting['value'];
}

define('APP_NAME', base64_decode($mainsettings['siteAppName']));
define('APP_VERSION', $mainsettings['siteAppVersion']);

include(ADMINPATH.'includes/Admin.Functions.php');
include(ADMINPATH.'includes/Admin.Auth.php');


?>